import { getAction, deleteAction, putAction, putparamsAction,postAction, httpAction } from '@/api/manage'
//  BOM信息
const getAllGoodsBaseInfo = (params)=>getAction("/wms/goods/getAllGoodsBaseInfo",params); // 物料下拉
const messBomInfoAdd = (params)=>postAction("/mess/bomInfo/add",params); // 新建
const messBomInfoEdit = (params)=>putAction("/mess/bomInfo/edit",params); // 编辑
const messBomInfoList = (params)=>getAction("/mess/bomInfo/list",params); // 列表
const messBomInfoQueryById = (params)=>getAction(`/mess/bomInfo/queryById?id=${params}`); // 详情
const messBomInfoQueryDelete = (params)=>deleteAction(`/mess/bomInfo/delete?id=${params}`); // 删除BOM
const checkInfoByGoodsId = (params)=>getAction("/mess/bomInfo/checkInfoByGoodsId",params); // 校验主物料
const checkDetailByGoodsId = (params)=>getAction("/mess/bomInfo/checkDetailByGoodsId",params); // 校验子物料
const queryBomListByBomId = (params)=>getAction("/mess/bomInfo/queryBomListByBomIdOrGoodsId/",params); // 获取BOM下的物料信息
const bomInfoDeleteBatch = (params)=>deleteAction(`/mess/bomInfo/deleteBatch?ids=${params}`); // 批量删除

export const BOMManagementApi = {
  bomInfoDeleteBatch,
  queryBomListByBomId,
  checkDetailByGoodsId,
  checkInfoByGoodsId,
  messBomInfoQueryDelete,
  messBomInfoEdit,
  messBomInfoQueryById,
  messBomInfoList,
  messBomInfoAdd,
  getAllGoodsBaseInfo,
}



